<?php namespace sacvoyage\hook;

require_once('sacvoyage/Object.php');
use \sacvoyage\Object;


use \sacvoyage\domain\Collection;


class Manager {
	
	public function addHook(Hook $hook) {
		$this->_hooks[]=$hook;
	}
	
	public function onWrite(Collection $collection, $documents) {
		foreach($this->_hooks as $hook) {
			$hook->onWrite($collection, $documents);
		}
	}
	
	public function onDelete(Collection $collection, $query) {
		foreach($this->_hooks as $hook) {
			$hook->onDelete($collection, $query);
		}
	}
	
	
}

?>
